package com.dnjn.happiness.biz.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.happiness.common.core.annotation.Excel;
import com.dnjn.happiness.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 点赞对象 biz_advice_thumbs_up
 *
 * @author happiness
 * @date 2023-10-16
 */
@Schema(name = "AdviceThumbsUp", description = "点赞")
@Accessors(chain = true)
@Getter
@Setter
@TableName("biz_advice_thumbs_up")
public class AdviceThumbsUp extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** PK */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    
    

    /** 建议ID */
    @Schema(description = "建议ID")
    @Excel(name = "建议ID")
    private Long adviceId;

    /** 用户ID */
    @Schema(description = "用户ID,当前登录用户")
    @Excel(name = "用户ID")
    private Long userId;

    /** 点赞次数 */
    @Schema(description = "点赞次数")
    @Excel(name = "点赞次数")
    private Long thumsCount;



    /** 是否删除 */
    @Schema(description = "是否删除")
    @Excel(name = "是否删除")
    private String deleted;

    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private String avatar;




    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("adviceId", getAdviceId())
                .append("userId", getUserId())
                .append("thumsCount", getThumsCount())

                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("deleted", getDeleted())
                .append("version", getVersion())
                .toString();
    }
}
